<div ng-if="pagedata.member.user=='worker' && pagedata.member.busy!=2" class="right-living" style="background:#cdab6a;position: fixed;bottom:20%; border: 0 solid #ededed;height:1.5rem;line-height: 1.5rem;right:0.5rem;padding-left:0.3rem;padding-right:0.2rem">
	<span ng-if="pagedata.member.busy==1" ng-click="pagedata.member.busy=0;post({'id':pagedata.member.id,'busy':0},'jy_cxjxiche/index/setonline/');" class="icon icon-nolingsheng0" style="font-size:0.6rem;margin:0">关闭听单</span> 
	<span ng-if="pagedata.member.busy==0" ng-click="pagedata.member.busy=1;pagedata.getorder();post({'id':pagedata.member.id,'busy':1},'jy_cxjxiche/index/setonline/');" class="icon icon-lingsheng0" style="font-size:0.6rem;margin:0">开启听单</span>
</div>
<script>
scope.pagedata.getorder=function(lat_lng){
		if(scope.page.action!='d_wait' || scope.pagedata.member.busy==0){
			return false;
		}
		lat_lng=lat_lng?lat_lng:scope.pagedata.lat_lng
		scope.get('jy_cxjxiche/d_wait/getorder/isexi=1&lat='+lat_lng.lat+'&lng='+lat_lng.lng,function(res){
			console.log(res);
			if(res != 'none'){
				res.show=1;
				$("#openvoice")[0].play();
				scope.pagedata.info=res;
				scope.$evalAsync();
			}else{
				setTimeout(function(){
					scope.pagedata.getorder();
				},2000);
			}
		});
}
</script>